import request from '@/utils/request'

// 获取版本列表
export function getVersionApi(pageNum, pageSize, versionNum,otaFlag) {
    return request({
        url: '/sys/ota/version',
        method: 'get',
        params: { pageNum, pageSize, versionNum,otaFlag }
    })
}
// 添加版本列表
export function addVersionApi(data) {
    return request({
        url: '/sys/ota/version',
        method: 'post',
        data
    })
}
// 获取硬件类别
export function getTypeApi() {
    return request({
        url: '/sys/ota/version/hardwares',
    })
}
// 获取硬件类别
export function delVersionApi(id) {
    return request({
        url: `/sys/ota/version/${id}`,
        method: 'delete'
    })
}
// 修改备注
export function editVersionApi(id,data) {
    return request({
        url: `/sys/ota/version/${id}`,
        method: 'put',
        data
    })
}
//设置ota标志符
export function postIsForbidApi(id, data) {
    return request({
        url: `/sys/ota/version/${id}/otaFlag`,
        method: 'put',
        data
    })
}